void inorder(struct TreeNode *root, int *res, int *resSize) {
	if (!root) {
		return;
	}
	inorder(root->left, res, resSize);
	res[(*resSize)++] = root->val;
	inorder(root->right, res, resSize);
}

int *inorderTraversal(struct TreeNode *root, int *returnSize) {
	int *res = malloc(sizeof(int) * 501);
	*returnSize = 0;
	inorder(root, res, returnSize);
	return res;
}

